using System;
using System.Collections.Generic;
using System.Data;
using Module.Common.Models;
using Module.Core.DAO;
using Module.Core.EntitiesInfo;

namespace Module.Core.BusinessLogic
{
    public class MemberNoteTreeBL
    {
        /// <summary>
        /// Saves a record to the Member_NoteTree table.
        /// </summary>
        public static int Insert(MemberNoteTreeInfo memberNoteTreeInfo)
        {
            try
            {
                return new MemberNoteTreeDAO().Insert(memberNoteTreeInfo);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        /// <summary>
        /// Saves a record to the Member_NoteTree table.
        /// </summary>
        public static void Update(int id, int status, int idMember_Active, int checkStatus, string position, int check)
        {
            try
            {
                new MemberNoteTreeDAO().Update(id, status, idMember_Active, checkStatus, position, check);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        /// <summary>
        /// Delete a record from the Member_NoteTree table.
        /// </summary>
        public static void Delete(int id)
        {
            try
            {
                new MemberNoteTreeDAO().Delete(id);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        /// <summary>
        /// Selects a single record from the Member_NoteTree table.
        /// </summary>
        public static MemberNoteTreeInfo Select(int status, string param, string param1)
        {
            try
            {
                return new MemberNoteTreeDAO().Select(status, param, param1);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        public static DataTable Select_Notte(int status, string param, string param1)
        {
            try
            {
                return new MemberNoteTreeDAO().Select_Notte(status, param, param1);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        /// <summary>
        /// Selects all records from the Member_NoteTree table.
        /// </summary>
        public static CHRTList<MemberNoteTreeInfo> ListSelect(int status, string param, string param1)
        {
            try
            {
                return new MemberNoteTreeDAO().ListSelect(status, param, param1);
            }
            catch (Exception ex)
            {
                throw;
            }

        }
        public static int CountNoteTree(string Idmember)
        {
            try
            {
                return new MemberNoteTreeDAO().CountNoteTree(Idmember);
            }
            catch (Exception ex)
            {
                throw;
            }
        }

        public static int CountStatus()
        {
            try
            {
                return new MemberNoteTreeDAO().CountStatus();
            }
            catch (Exception ex)
            {
                throw;
            }
        }
    }
}
